import service from "../../utils/request";
type createOrderType = {
  ownder: number;
  allPrice: number;
  goodsList: GoodsListType[];
  addressId: number;
  remark: string;
};

type GoodsListType = {
  num: number;
  price: number;
  goodsId: number;
  stockId: number;
  goodsName: string;
  picture: string;
};

export function createOrder(data: createOrderType) {
  return service.post("/order/createOrder", data);
}

export function getOrderList() {
  return service.get("/order/getAllList");
}

export function confirmReceipt(data) {
  return service.get("/order/confirmReceipt?id=" + data);
}
